const db = require('../common/mongoose'),
  mongoose = db.mongoose,
  Schema = db.Schema;

let logSchema = new Schema({
  // 异常信息
  message: {type: String},
  // 记录时间
  timestamp: {type: Date},
  // 级别
  level: {type: String},
  // 详细信息
  meta: {type: Schema.Types.Mixed}
});

let LogModel = mongoose.model('Log', logSchema, 'log');

module.exports = LogModel;